package za.org.jcicada.genss.sensor;

/**
 * ISensorSubject.java
 *
 * @author Simon Cross
 *
 * Created on November 11, 2008, 14:10
 */

import java.util.Set;


/**
 * Interface for interacting with the sensors present in a generic
 * software subsystem.
 *
 * @todo Methods in the MagicDraw interface but not here are:
 * allocateAggregateSensor, deallocateAggregateSensor,
 * setAggregateSensor.
 */
public interface ISensorSubject {

    /**
     * Attach an observer to a list of sensors.
     *
     * Calls observer.responseAttach() with the result.
     */
    void requestAttach(ISensorObserver observer, Set<SensorURN> sensorURNs);

    /**
     * Detach an observer from a list of sensors.
     *
     * Calls observer.responseDetach() with the result.
     */
    void requestDetach(ISensorObserver observer, Set<SensorURN> sensorURNs);
    
    /**
     * Return a set of sensors know by this subsystem.
     */
    void requestSensorSet(ISensorObserver observer);

    /**
     * Set sensor sampling strategy for this observer.
     */
    void requestSetSamplingStrategy(ISensorObserver observer, ISamplingStrategy strategy);
    
    /**
     * Inform the subject that the observer is disconnecting.
     */
    void informDisconnect(ISensorObserver observer);

}
